﻿using System;
using System.Xml;
using Headsight.BPMN2WF.BPMN.Schemas;

namespace Headsight.BPMN2WF.Testing.TestObjCtors
{
    /// <summary>
    /// <see cref="BPMNShape"/>  <see cref="ITestObjCtor{T}"/>.
    /// </summary>
    public class BPMNShapeCtor : ITestObjCtor<BPMNShape>
    {
        private String _id;

        public BPMNShape Create()
        {
            var result = new BPMNShape
                             {
                                 Bounds = new Bounds() {height = 4, width = 3, x = 1, y = 2},
                                 bpmnElement = new XmlQualifiedName(_id)
                             };

            return result;
        }

        public BPMNShapeCtor WithForBPMNElementHavingId(String id)
        {
            _id = id;

            return this;
        }
    }
}